<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="Admina Bootstrap Admin. This is the demo of Admina. You need to purchase a license for legal use!">
    <meta name="author" content="DownTown Themes">

    <link rel="shortcut icon" href="../assets/img/icon.png">

    <title>Admina - Responsive Admin Template</title>

    <!-- Google Fonts -->
    <link href='http://fonts.googleapis.com/css?family=Roboto:400,100,100italic,300,300italic,400italic,500,500italic,700,700italic,900,900italic' rel='stylesheet' type='text/css'>

    <!--Icon fonts css-->
    <link href="../assets/plugins/font-awesome/css/font-awesome.css" rel="stylesheet" />
    <link href="../assets/plugins/ionicon/css/ionicons.min.css" rel="stylesheet" />

    <!-- Bootstrap CSS -->
    <link href="../assets/css/bootstrap.min.css" rel="stylesheet">
    <link href="../assets/css/bootstrap-reset.css" rel="stylesheet">

    <!--Animation css-->
    <link href="../assets/css/animate.css" rel="stylesheet">

    <!--Morris Chart CSS -->
    <link rel="stylesheet" href="../assets/plugins/morris/morris.css">
    <!-- sweet alerts -->
    <link href="../assets/plugins/sweet-alert/sweet-alert.min.css" rel="stylesheet">
    <!-- DataTables -->
    <link href="../assets/plugins/datatables/jquery.dataTables.min.css" rel="stylesheet" type="text/css" />

    <!-- sweet alerts -->
    <link href="../assets/plugins/sweet-alert/sweet-alert.min.css" rel="stylesheet">

    <!-- Custom styles -->
    <link href="../assets/css/style.css" rel="stylesheet">
    <link href="../assets/css/helper.css" rel="stylesheet">
    <link href="../assets/css/style-responsive.css" rel="stylesheet" />

    <!-- HTML5 shim and Respond.js IE8 support of HTML5 tooltipss and media queries -->
    <!--[if lt IE 9]>
    <script src="js/html5shiv.js"></script>
    <script src="js/respond.min.js"></script>
    <![endif]-->

</head>

<body>

<!-- Header -->
<header class="top-head container-fluid navbar-fixed-top">
    <!-- logo -->
    <div class="logo hidden-xs">
        <a href="../product/index-2.html" class="logo-expanded"> <img src="../assets/img/icon.png" alt="logo"> <span class="nav-text">Admina</span> </a>
    </div>
    <!-- end logo -->
    <button type="button" class="navbar-toggle pull-left">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-toggle ion-navicon-round"></span>
    </button>

    <!-- Search -->
    <form role="search" class="navbar-left app-search pull-left hidden-xs">
        <input type="text" placeholder="Search..." class="form-control">
    </form>
    <!-- End Search -->

    <!-- Right navbar -->
    <ul class="list-inline navbar-right top-menu top-right-menu">
        <!-- Messages -->
        <li class="dropdown">
            <a data-toggle="dropdown" class="dropdown-toggle" href="#"> <i class="fa fa-envelope-o "></i> <span class="badge badge-sm up bg-purple count">4</span> </a>
            <ul class="dropdown-menu extended fadeInUp animated nicescroll" tabindex="5001">
                <li>
                    <p>
                        Messages
                    </p>
                </li>
                <li>
                    <a href="#"> <span class="pull-left"><img src="../assets/img/avatar-2.jpg" class="img-circle thumb-sm m-r-15" alt="img"></span> <span class="block"><strong>Hammond Burke</strong></span> <span class="media-body block">New tasks
								<br>
								<small class="text-muted">3 seconds ago</small></span> </a>
                </li>
                <li>
                    <a href="#"> <span class="pull-left"><img src="../assets/img/avatar-3.jpg" class="img-circle thumb-sm m-r-15" alt="img"></span> <span class="block"><strong>Ray Shannon</strong></span> <span class="media-body block">New file add
								<br>
								<small class="text-muted">5 minutes ago</small></span> </a>
                </li>
                <li>
                    <a href="#"> <span class="pull-left"><img src="../assets/img/avatar-4.jpg" class="img-circle thumb-sm m-r-15" alt="img"></span> <span class="block"><strong>Hammond Burke</strong></span> <span class="media-body block">New file add
								<br>
								<small class="text-muted">12 minutes ago</small></span> </a>
                </li>
                <li>
                    <a href="#"> <span class="pull-left"><img src="../assets/img/avatar-5.jpg" class="img-circle thumb-sm m-r-15" alt="img"></span> <span class="block"><strong>Ray Shannon</strong></span> <span class="media-body block">New tasks needs to be done
								<br>
								<small class="text-muted">15 minutes ago</small></span> </a>
                </li>
                <li>
                    <p class="text-center">
                        <a href="../inbox.html">All Messages</a>
                    </p>
                </li>
            </ul>
        </li>
        <!-- End messages -->
        <!-- Notification -->
        <li class="dropdown">
            <a data-toggle="dropdown" class="dropdown-toggle" href="#"> <i class="fa fa-bell-o"></i> <span class="badge badge-sm up bg-pink count">5</span> </a>
            <ul class="dropdown-menu extended fadeInUp animated nicescroll" tabindex="5002">
                <li class="noti-header">
                    <p>
                        Notifications
                    </p>
                </li>
                <li>
                    <a href="#"> <span class="pull-left"><i class="fa fa-user-plus fa-2x text-info"></i></span> <span>New user add
								<br>
								<small class="text-muted">2 minutes ago</small></span> </a>
                </li>
                <li>
                    <a href="#"> <span class="pull-left"><i class="fa fa-diamond fa-2x text-primary"></i></span> <span>Use file add
								<br>
								<small class="text-muted">4 minutes ago</small></span> </a>
                </li>
                <li>
                    <a href="#"> <span class="pull-left"><i class="fa fa-bell-o fa-2x text-danger"></i></span> <span>Send project demo files to client
								<br>
								<small class="text-muted">2 hour ago</small></span> </a>
                </li>
                <li>
                    <a href="#"> <span class="pull-left"><i class="fa fa-cloud-upload fa-2x text-success"></i></span> <span>Download project
								<br>
								<small class="text-muted">3 hour ago</small></span> </a>
                </li>
                <li>
                    <a href="#"> <span class="pull-left"><i class="fa fa-cloud-download fa-2x text-warning"></i></span> <span>Upload projects
								<br>
								<small class="text-muted">5 hour ago</small></span> </a>
                </li>

                <li>
                    <p class="text-center">
                        <a href="#">All notifications</a>
                    </p>
                </li>
            </ul>
        </li>
        <!-- End Notification -->

        <!-- User Menu Dropdown -->
        <li class="dropdown text-center">
            <a data-toggle="dropdown" class="dropdown-toggle" href="#"> <img alt="" src="../assets/img/avatar-2.jpg" class="img-circle profile-img thumb-sm"> <span class="username">Ray Shannon </span> <span class="caret"></span> </a>
            <ul class="dropdown-menu extended pro-menu fadeInUp animated" tabindex="5003" style="overflow: hidden; outline: none;">
                <li>
                    <a href="profile.html"><i class="fa fa-briefcase"></i>Profile</a>
                </li>
                <li>
                    <a href="#"><i class="fa fa-cog"></i> Settings</a>
                </li>
                <li>
                    <a href="#"><i class="fa fa-bell"></i><span class="pull-left"> Issues</span> <span class="label label-info pull-right mail-info">5</span></a>
                </li>
                <li>
                    <a href="#"><i class="fa fa-sign-out"></i> Log Out</a>
                </li>
            </ul>
        </li>
        <!-- End User Menu Dropdown -->
    </ul>
    <!-- End Right Navbar -->

</header>
<!-- End Header -->

<!-- Aside Menu -->
<aside class="left-panel">
    <!-- Navbar -->
    <nav class="navigation">
        <ul class="list-unstyled">

            <li class="has-submenu">
                <a href="#"><i class="ion-settings"></i> <span class="nav-label">Ebay文案配置</span> <span class="caret pull-right m-t-10"></span></a>
                <ul class="list-unstyled">
                    <li>
                        <a href="index.html">账号管理</a>
                    </li>
                    <li>
                        <a href="EbaySiteManage.html">站点管理</a>
                    </li>
                    <li>
                        <a href="EbayConfig.html">参数配置</a>
                    </li>
                </ul>
            </li>

            <li class="has-submenu">
                <a href="#"><i class="ion-flask"></i> <span class="nav-label">Amazon文案配置</span> <span class="caret pull-right m-t-10"></span></a>
                <ul class="list-unstyled">
                    <li>
                        <a href="AmazonAccount.html">账号管理</a>
                    </li>
                    <li>
                        <a href="AmazonSiteManage.html">站点管理</a>
                    </li>
                    <li>
                        <a href="AmazonConfig.html">参数配置</a>
                    </li>
                    <li>
                        <a href="serverConfig.html">服务器管理</a>
                    </li>
                </ul>
            </li>


            <li>
                <a href="index-2.html"><i class="ion-home"></i> <span class="nav-label">产品线配置</span></a>
            </li>
        </ul>
    </nav>
    <!-- End Navbar -->
</aside>
<!-- End Aside -->

<!--Main Content -->
<section class="content">

    <!-- Page Content -->

    <div class="wraper container-fluid">
        <div class="page-title">
            <h3 class="title">Datatable</h3>
        </div>

        <div class="row">
            <div class="col-md-12">
                <div class="panel panel-default">
                    <div class="panel-heading">
                        <button class="btn btn-success" data-toggle="modal" data-target="#new_ebay_site" myAttr="ds">+ 添加站点</button>
                    </div>
                    <div class="panel-body">
                        <div class="row">
                            <div class="col-md-12 col-sm-12 col-xs-12">
                                <table id="datatable" class="table table-striped table-bordered">
                                    <thead>
                                    <tr>
                                        <th>站点名称</th>
                                        <th>运费标准</th>
                                        <th>处理费用</th>
                                        <th>汇率</th>
                                        <th>利润率</th>
                                        <th class="hidden">备注</th>
                                        <th>创建时间</th>
                                        <th>最近修改时间</th>
                                        <th>操作</th>
                                    </tr>
                                    </thead>

                                    <tbody>

                                    <tr>
                                        <td>Michael Bruce</td>
                                        <td>Javascript Developer</td>
                                        <td>Singapore</td>
                                        <td>29</td>
                                        <td>2011/06/27</td>
                                        <td class="hidden">ddddddddddd</td>
                                        <td>29</td>
                                        <td>2011/06/27</td>
                                        <td><button class="updateBtn btn btn-primary btn-sm" data-toggle="modal" data-target="#con-close-modal" myAttr="ds1">修改</button><button class="btn btn-info btn-sm sa-delete" myAttr="id1">删除</button></td>
                                    </tr>
                                    <tr>
                                        <td>Donna Snider</td>
                                        <td>Customer Support</td>
                                        <td>New York</td>
                                        <td>27</td>
                                        <td>2011/01/25</td>
                                        <td class="hidden">ddddddddddd</td>
                                        <td>27</td>
                                        <td>2011/01/25</td>
                                        <td><button class="updateBtn btn btn-primary btn-sm" data-toggle="modal" data-target="#con-close-modal" myAttr="ds2">修改</button><button class="btn btn-info btn-sm sa-delete" myAttr="id2">删除</button></td>
                                    </tr>
                                    </tbody>
                                </table>
                            </div>
                            <div id="con-close-modal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="display: none;">
                                <div class="modal-dialog">
                                    <div class="modal-content">
                                        <div class="modal-header">
                                            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                                            <h4 class="modal-title">修改Amazon站点信息</h4>
                                        </div>
                                        <div class="modal-body">
                                            <div class="row">
                                                <input type="hidden" class="form-control" id="siteId" name="siteId">
                                                <div class="col-md-6">
                                                    <div class="form-group">
                                                        <label for="ownerSiteName" class="control-label">站点名称</label>
                                                        <input type="text" class="form-control" id="ownerSiteName" placeholder="ownerSiteName" name="ownerSiteName">
                                                    </div>
                                                </div>
                                                <div class="col-md-6">
                                                    <div class="form-group">
                                                        <label for="freight" class="control-label">运费标准</label>
                                                        <input type="text" class="form-control" id="freight" placeholder="freight" name="freight">
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="row">
                                                <div class="col-md-12">
                                                    <div class="form-group">
                                                        <label for="costOfDeal" class="control-label">处理费用</label>
                                                        <input type="text" class="form-control" id="costOfDeal" placeholder="costOfDeal" name="costOfDeal">
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="row">
                                                <div class="col-md-6">
                                                    <div class="form-group">
                                                        <label for="exchangeRate" class="control-label">汇率</label>
                                                        <input type="text" class="form-control" id="exchangeRate" placeholder="exchangeRate" name="exchangeRate">
                                                    </div>
                                                </div>
                                                <div class="col-md-6">
                                                    <div class="form-group">
                                                        <label for="profitPercentage" class="control-label">利润率</label>
                                                        <input type="text" class="form-control" id="profitPercentage" name="profitPercentage" placeholder="profitPercentage">
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="row">
                                                <div class="col-md-12">
                                                    <div class="form-group no-margin">
                                                        <label for="remark" class="control-label">备注</label>
                                                        <textarea class="form-control autogrow" id="remark" name="remark" placeholder="Write something about yourself" style="overflow: hidden; word-wrap: break-word; resize: horizontal; height: 104px;"></textarea>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="modal-footer">
                                            <button type="button" class="btn btn-white" data-dismiss="modal">Close</button>
                                            <button type="button" class="btn btn-info">Save changes</button>
                                        </div>
                                    </div>
                                </div>
                            </div><!-- /.modal -->
                            <div id="new_ebay_site" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="display: none;">
                                <div class="modal-dialog">
                                    <div class="modal-content">
                                        <div class="modal-header">
                                            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                                            <h4 class="modal-title">添加Amazon站点信息</h4>
                                        </div>
                                        <div class="modal-body">
                                            <div class="row">
                                                <div class="col-md-6">
                                                    <div class="form-group">
                                                        <label class="control-label">站点名称</label>
                                                        <input type="text" class="form-control"  placeholder="ownerSiteName" name="ownerSiteName">
                                                    </div>
                                                </div>
                                                <div class="col-md-6">
                                                    <div class="form-group">
                                                        <label  class="control-label">运费标准</label>
                                                        <input type="text" class="form-control"  placeholder="freight" name="freight">
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="row">
                                                <div class="col-md-12">
                                                    <div class="form-group">
                                                        <label  class="control-label">处理费用</label>
                                                        <input type="text" class="form-control"  placeholder="costOfDeal" name="costOfDeal">
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="row">
                                                <div class="col-md-6">
                                                    <div class="form-group">
                                                        <label  class="control-label">汇率</label>
                                                        <input type="text" class="form-control"  placeholder="exchangeRate" name="exchangeRate">
                                                    </div>
                                                </div>
                                                <div class="col-md-6">
                                                    <div class="form-group">
                                                        <label  class="control-label">利润率</label>
                                                        <input type="text" class="form-control"  name="profitPercentage" placeholder="profitPercentage">
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="row">
                                                <div class="col-md-12">
                                                    <div class="form-group no-margin">
                                                        <label  class="control-label">备注</label>
                                                        <textarea class="form-control autogrow"  name="remark" placeholder="Write something about yourself" style="overflow: hidden; word-wrap: break-word; resize: horizontal; height: 104px;"></textarea>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="modal-footer">
                                            <button type="button" class="btn btn-white" data-dismiss="modal">Close</button>
                                            <button type="button" class="btn btn-info">Save changes</button>
                                        </div>
                                    </div>
                                </div>
                            </div><!-- /.modal -->

                        </div>
                    </div>
                </div>
            </div>

        </div>
        <!-- End Row -->

    </div>

    <!-- Page Content Ends -->

    <!-- Footer -->
    <footer class="footer">
        2015 © Admina By Downtown Themes
    </footer>
    <!-- End Footer -->

</section>

<!-- Basic Plugins -->
<script src="../assets/js/jquery.js"></script>
<script src="../assets/js/bootstrap.min.js"></script>
<script src="../assets/js/pace.min.js"></script>
<script src="../assets/js/wow.min.js"></script>
<script src="../assets/js/jquery.nicescroll.js" type="text/javascript"></script>

<script src="../assets/js/app.js"></script>

<script src="../assets/plugins/datatables/jquery.dataTables.min.js"></script>
<script src="../assets/plugins/datatables/dataTables.bootstrap.js"></script>
<!-- Sweet Alert Plugin -->
<script src="../assets/plugins/sweet-alert/sweet-alert.min.js"></script>
<script src="../assets/plugins/sweet-alert/sweet-alert.init.js"></script>

<script type="text/javascript">
    $(document).ready(function() {
        $('#datatable').dataTable();
        $('.sa-delete').click(function() {
            var pramery = $(this).attr("myAttr");//删除key

            swal({
                title: "Are you sure?",
                text: "You will not be able to recover this imaginary file!",
                type: "warning",
                showCancelButton: true,
                confirmButtonColor: "#DD6B55",
                confirmButtonText: "Yes, delete it!",
                cancelButtonText: "No, cancel plx!",
                closeOnConfirm: false,
                closeOnCancel: false
            }, function (isConfirm) {
                if (isConfirm) {
                    alert(pramery)
                    swal("Deleted!", "Your imaginary file has been deleted.", "success");
                } else {
                    swal("Cancelled", "", "error");
                }
            });
        });

        $(".updateBtn").click(function(){
            var myAttr = $(this).attr("myAttr");
            var myself = $(this).parents("tr").children("td");
            var ownerSiteName = myself.eq(0).html();
            var freight = myself.eq(1).html();
            var costOfDeal = myself.eq(2).html();
            var exchangeRate = myself.eq(3).html();
            var profitPercentage = myself.eq(4).html();
            var remark = myself.eq(5).html();
            $("#siteId").val(myAttr);
            $("#ownerSiteName").val(ownerSiteName);
            $("#freight").val(freight);
            $("#costOfDeal").val(costOfDeal);
            $("#exchangeRate").val(exchangeRate);
            $("#profitPercentage").val(profitPercentage);
            $("#remark").val(remark);
        })
    });
</script>

</body>
</html>
